{*
	This file is part of Jetbird.

    Jetbird is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Jetbird is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Jetbird.  If not, see <http://www.gnu.org/licenses/>.
*}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Jetbird Preview</title>
	<link type="text/css" rel="stylesheet" media="screen" href="{$template_dir}/css/style.css" />
</head>

<body>
	<div id="wrap_main">
		{include file="head.tpl"}
		<div id="wrap_content">
			{if $smarty.get.action == login}
			{if !isset($smarty.session.login)}
			{if $login === FALSE}
			<p class="error"><b>Error:</b> password or username wrong, please try again.</p>
			{/if}
				<form name="input" action="./?user&amp;action=login" method="post">
				<table>
					<tr>
					<td><b>Username</b></td>
						<td><input type="text" name="username" /></td>
					</tr>
						
					<tr>
						<td><b>Password</b></td>
						<td><input type="password" name="password"></td>
					</tr>
						
					<tr>
						<td><b>Remind me</b></td>
						<td><input type="checkbox" name="rememberlogin" disabled /></td>
					</tr>
						
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" value="Login" /></td>
					</tr>
				</table>
				</form>
				
			{elseif isset($smarty.session.login) && !isset($smarty.post.username)}
			<p><b>Error:</b> you are already logged in</p>
			{/if}
				
			{if $login === TRUE}
			<p>Redirecting to admin dashboard</p>
			{/if}
				
			{elseif $smarty.get.action == logout}
			<p>You successfully logged out</p>
			{/if}	
		</div>
				
	{include file="foot.tpl"}	
	</div>	
</body>
</html>
	